//
//  USCollectionMenu.h
//  usale0001
//
//  Created by YU on 16/1/22.
//  Copyright © 2016年 YU. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol USCollectionMenuDelegate <NSObject>

- (void)usCollectionMenu:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath;

@end

typedef void(^Dismiss)(void);
@interface USCollectionMenu : UIView <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *collectionView;
@property (nonatomic, assign) id <USCollectionMenuDelegate> delegate;

@property (nonatomic, strong) NSArray *titleArray;
@property (nonatomic, strong) NSArray *colorArray;

@property (nonatomic, copy) Dismiss dismiss;

@property (nonatomic, assign) BOOL NotDissmiss;


- (instancetype)initWithOrigin:(CGPoint)origin titleArray:(NSArray *)titleArray colorArray:(NSArray *)colorArray;

- (void)dismissWithCompletion:(void (^)(USCollectionMenu *object))completion;
@end
